package org.dwell.vertx3.demos.core;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.Vertx;

/**
 * Created by Emily on 16/1/14.
 */
public class ContextVerticle extends AbstractVerticle {

    public static void main(String[] args) {
        Vertx vertx = Vertx.vertx();
        System.out.println("before ... ");
        vertx.getOrCreateContext().runOnContext(v -> {
            System.out.println("This will be executed asynchronously in the same context");
        });
        System.out.println("after ... ");
    }

    @Override
    public void start() throws Exception {

    }
}
